/**
 **/

package edu.towson.cosc603.coffeemaker;

import static org.junit.Assert.*;
import junit.framework.TestCase;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
  @author Sushma
 
 **/
public class RecipeTest extends TestCase{

        private Recipe recipeLatte;
        private Recipe recipeVanila;
        private Recipe recipeMocha;
        private Recipe recipeCappuccino;
        
        /**
         @throws java.lang.Exception
         
         **/

        @Before
        public void setUp() throws Exception {
                
        	 recipeLatte = new Recipe();
             recipeLatte.setName("Latte");
             recipeLatte.setPrice(45);
             recipeLatte.setAmtCoffee(5);
             recipeLatte.setAmtMilk(2);
             recipeLatte.setAmtSugar(1);
             recipeLatte.setAmtChocolate(0);
                              
             recipeVanila = new Recipe();
             recipeVanila.setName("Vanila");
             recipeVanila.setPrice(55);
             recipeVanila.setAmtCoffee(5);
             recipeVanila.setAmtMilk(1);
             recipeVanila.setAmtSugar(1);
             recipeVanila.setAmtChocolate(0);

          

             recipeMocha = new Recipe();
             recipeMocha.setName("Mocha");
             recipeMocha.setPrice(50);
             recipeMocha.setAmtCoffee(4);
             recipeMocha.setAmtMilk(1);
             recipeMocha.setAmtSugar(1);
             recipeMocha.setAmtChocolate(2);
             
             recipeCappuccino = new Recipe();
             recipeCappuccino.setName("Cappuccino");
             recipeCappuccino.setPrice(50);
             recipeCappuccino.setAmtCoffee(6);
             recipeCappuccino.setAmtMilk(1);
             recipeCappuccino.setAmtSugar(1);
             recipeCappuccino.setAmtChocolate(0);
        }

        /**
         @throws java.lang.Exception
         **/
        
        @After
        public void tearDown() throws Exception {
        }

        /**
          Test method for {@link edu.towson.cosc603.coffeemaker.Recipe#getAmtChocolate()}.
          Post Condition: The test will be true if the amount of Chocolate match with the recipes chocolate amount.
         **/
        
        @Test
        public void testGetAmtChocolate() {
                assertEquals(2, recipeMocha.getAmtChocolate());
                
        }


        /**
         Test method for {@link edu.towson.cosc603.coffeemaker.Recipe#getAmtCoffee()}.
         Post Condition: The test will be true if the amount of coffee match with the recipe coffee amount.
         **/
        
        @Test
        public void testGetAmtCoffee() {
                assertEquals(6, recipeCappuccino.getAmtCoffee());
        }

        /**
         Test method for {@link edu.towson.cosc603.coffeemaker.Recipe#getAmtMilk()}.
         Post Condition: The Test will be true if the  amount of milk match with the recipe milk quantity.
         **/
        
        @Test
        public void testGetAmtMilk() {
                assertEquals(1, recipeCappuccino.getAmtMilk());
        }

        /**
         Test method for {@link edu.towson.cosc603.coffeemaker.Recipe#getAmtSugar()}.
         Post Condition: The test will be true if the  amount of sugar match with the recipe sugar quantity.
         **/
        
        @Test
        public void testGetAmtSugar() {
                assertEquals(1, recipeCappuccino.getAmtSugar());
        }
        
        /**
         Test method for {@link edu.towson.cosc603.coffeemaker.Recipe#setAmtChocolate(int amtChocolate)}.
         Post Condition: The test will be true if the amount of chocolate will be zero
         **/
        
        @Test
        public void testSetAmtChocolate() {
            
        	recipeCappuccino.setAmtChocolate(0);
                assertEquals(0, recipeCappuccino.getAmtChocolate());
        }
        
        


        /**
         Test method for {@link edu.towson.cosc603.coffeemaker.Recipe#getName()}.
         Post Condition: The test will be true if the name matches with the recipe name
         **/
        
        @Test
        public void testGetName() {
                assertEquals("Cappuccino",recipeCappuccino.getName());
        }

        /**
          Test method for {@link edu.towson.cosc603.coffeemaker.Recipe#getPrice()}.
          Post Condition: The test will be true if the price match with the recipe price
         
         **/
        @Test
        public void testGetPrice() {
                assertEquals(50, recipeCappuccino.getPrice());
        }


        /**
         Test method for {@link edu.towson.cosc603.coffeemaker.Recipe#toString()}.
         **/
        @Test
        public void testToString() {
                
        }

}
